<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>{% if title %} {{ title }} {% else %} IASNA core {% endif %}</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<link href="{{ TEMPLATES_MEDIA_URL }}default.css" rel="stylesheet" type="text/css" />

	{% if CALENDAR_MEDIA_URL %}
	<script src="{{ CALENDAR_MEDIA_URL }}src/js/jscal2.js"></script>
    <script src="{{ CALENDAR_MEDIA_URL }}src/js/lang/en.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ CALENDAR_MEDIA_URL }}src/css/jscal2.css" />
    <link rel="stylesheet" type="text/css" href="{{ CALENDAR_MEDIA_URL }}src/css/border-radius.css" />
    <link rel="stylesheet" type="text/css" href="{{ CALENDAR_MEDIA_URL }}src/css/steel/steel.css" />
    {% endif %}
</head>
<body>



<div id="header">
	<a href="/iasna/">
		<div id="logo">
			<h1><a href="/iasna/">IASNA</a></h1>
			<h2><a href="/iasna/">core</a></h2>
		</div>
	</a>
	<div id="menu">
		<ul>
			{% for key, value in menu.items %}
				<li class="{{ value.status }}"><a href="{{ value.url }}" accesskey="1" title="">{{ value.short_name }}</a></li>
			{% endfor %}
		</ul>
	</div>
	<div id="splash"><img src="{{ TEMPLATES_MEDIA_URL }}images/img05.jpg" alt="" width="480" height="102" /></div>
</div>

<div id="content">
	<div id="posts">
		<div class="post">
			<h2 class="title">{{ subtitle }}</h2>
			<div class="story">
				{{ welcome }}<br /><br />
				
				{% if request_POST %}
					<table>
						{% ifequal request_POST.criterion 'AS' %}
							<tr>
								<th>Criterion:</th>
								<td>Analysis for sessions</td>
							</tr>
						{% else %}
							{% ifequal request_POST.criterion 'AD' %}
								<tr>
									<th>Criterion:</th>
									<td>Analysis for date range</td>
								</tr>
								<tr>
									<th>Datetime start:</th>
									<td>{{ request_POST.datetime_start }}</td>
								</tr>
								<tr>
									<th>Datetime end:</th>
									<td>{{ request_POST.datetime_end }}</td>
								</tr>
								{% ifequal request_POST.minute_segmentation_chk 'on' %}
									<tr>
										<th>Segmentation:</th>
										<td>It takes sample each {{ request_POST.minute_segmentation }} minutes</td>
									</tr>
								{% endifequal %}
							{% endifequal %}
						{% endifequal %}
					</table>
				{% endif %}
				
				
				{% if analysisform %}
					<form method="post" action="/iasna/results/{{ xmlfile }}/">
				      <table>
				      	{{ analysisform }}
				        <tr>
				          <th><label for="datetime_start">Datetime start:</label></th>
				          <td><input style="text-align: center" readonly="true" name="datetime_start" id="datetime_start" size="30" /></td>
				          <td colspan="4" id="cont_date_s"></td>
				        </tr>
				        <tr><td height="30px"></td></tr>
				        <tr>
				          <th><label for="datetime_end">Datetime end:</label></th>
				          <td><input style="text-align: center" readonly="true" name="datetime_end" id="datetime_end" size="30" /></td>
				          <td colspan="4" id="cont_date_e"></td>
				        </tr>
				        <tr><td colspan="2" align="right"><input type="submit" value="Apply indicators"></td></tr>
				      </table>
				    </form>
				    <script type="text/javascript">//<![CDATA[
						function updateFieldsStart(cal) {
							var date = cal.selection.get();
							if (date) {
								date = Calendar.intToDate(date);
								document.getElementById("datetime_start").value = Calendar.printDate(date, "%Y-%m-%d");
							}
							document.getElementById("datetime_start").value += " " + cal.getHours() + ":" + cal.getMinutes();
						};
						function updateFieldsEnd(cal) {
							var date = cal.selection.get();
							if (date) {
								date = Calendar.intToDate(date);
								document.getElementById("datetime_end").value = Calendar.printDate(date, "%Y-%m-%d");
							}
							document.getElementById("datetime_end").value += " " + cal.getHours() + ":" + cal.getMinutes();
						};
						function getDateInfo(date, wantsClassName) {
				              var as_number = Calendar.dateToInt(date);
				              if (as_number >= {{ dates.datetime_start.date }} && as_number <= {{ dates.datetime_end.date }})
			                      return {
		                              klass   : "highlight2",
		                              tooltip : "<div style='text-align: center'>The activity was done from {{ dates.datetime_start.time }} to {{ dates.datetime_end.time }}</div>"
			                      };
				              
				      	};
						Calendar.setup({
							cont         : "cont_date_e",
							showTime     : 24,
							onSelect     : updateFieldsEnd,
							onTimeChange : updateFieldsEnd,
							date     	 : {{ dates.datetime_end.date }},
							dateInfo : getDateInfo,
							
						});
						Calendar.setup({
							cont         : "cont_date_s",
							showTime     : 24,
							onSelect     : updateFieldsStart,
							onTimeChange : updateFieldsStart,
							date     	 : {{ dates.datetime_start.date }},
							dateInfo : getDateInfo,
							
						});
						
						//]]></script>
				{% endif %}
				
				
				{% if options %}
					<p>To continue, choose an option.</p>
					{% for key, value in options.items %}
						<li><a href="{{value.url}}">{{ key }}</a></li>
					{% endfor %}
				{% endif %}
				{% if link_to_module %}
					<p>{{ link_to_module.text }}</p>
					<a href="{{ link_to_module.url }}">{{ link_to_module.name }}</a>
				{% endif %}
			</div>
		</div>
	</div>
	
	
	<div id="bar">
		<div id="archives" class="boxed1">
			<h2>Functions</h2>
			<ul>
				{% if functions %}
				{% for key, value in functions.items %}
					<li class="{{ value.status }}"><a href="{{ value.url }}">{{ key }}</a></li>
				{% endfor %}
				{% else %}
					Continue con los opciones indicadas.
				{% endif %}
			</ul>
		</div>
		<div id="categories" class="boxed2">
			<h2>Modules</h2>
			<ul>
				{% if modules %}
					{% for key, value in modules.items %}
						<li class="{{ value.status }}"><a href="{{ value.url }}">{{ key }}</a></li>
					{% endfor %}
				{% endif %}
			</ul>
		</div>
	</div>
	
	
</div>
<div id="footer">
	<p id="copy">&copy;2010 IASNA core. Designed under <a href="http://code.google.com/p/iasna/">IASNA Project.</a></p>
	<p id="feed"><a href="#" id="rss">RSS Feed</a></p>
</div>
<a href='http://www.mcanime.net/' title='kinsoku jikou'>kinsoku jikou</a>



<!-- <a href="http://www.dynarch.com/projects/calendar/">The new coolest JavaScript calendar</a>-->
<!-- <a href="http://www.dynarch.com/projects/calendar/doc/">Extensive API documentation is available at www.dynarch.com</a>-->


</body>
</html>


